package com.avitrix.misc;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

public class UICLUtils {
  public static String getContextVar(String propName) {
    String retval = null;

    try {
      InitialContext ic = new InitialContext();
      Context ctx = (Context)ic.lookup("java:comp/env");
      retval = (String)(ctx.lookup(propName));

    } catch (NamingException nex) {
      // do nothing; fall back to our default.
    }

    return retval;

  }
	
}
